' BASIC Anywhere Machine program by Charlie Veniot
' mod of cube rotator in 11 lines. From a 19 liner by Entropy, shrinked by Antoni Gual 
' from https://qb45.org/download.php?id=1076 (file file "Antoni4.bas" )
' This program exported from BASIC Anywhere Machine (Version [5.2.3].[2023.01.14.19.01]) on 2023.01.15 at 05.39
DIM AS DOUBLE r, x1, x, y, z
1 IF x1 = 0 THEN SCREEN _NEWIMAGE(180, 140, 7) ELSE r = (r + .01745) + 6.283185 * (r >= 6.283185) 
2  FOR x = -30 TO 30 STEP 30 
3    FOR y = -30 TO 30 STEP 3 
4      FOR z = -30 TO 30 STEP 3
this_c = 15
IF x = 0 THEN this_c = 14
IF x = 30 THEN this_c = 11
5        x1 = ((x * COS(r) - (z * COS(r) - y * SIN(r)) * SIN(r)) * COS(r) + (y * COS(r) + z * SIN(r)) * SIN(r)) / (x * SIN(r) + (z * COS(r) - y * SIN(r)) * COS(r) + 100) 
6        y1 = ((y * COS(r) + z * SIN(r)) * COS(r) - (x * COS(r) - (z * COS(r) - y * SIN(r)) * SIN(r)) * SIN(r)) / (x * SIN(r) + (z * COS(r) - y * SIN(r)) * COS(r) + 100) 
7        PSET (INT(100 * x1 + 90), INT(100 * y1 + 70)), this_c
8  NEXT z, y, x 
_DISPLAY
_DELAY 0.0125
WHILE _MOUSEBUTTON : WEND
CLS
GOTO 1